package com.zjw.socket.demo.starter.option;

import com.zjw.socket.demo.starter.config.ApplicationConfig;
import io.vertx.core.datagram.DatagramSocketOptions;
import io.vertx.core.net.NetServerOptions;

public final class ServiceOptionsFactory {

  /**
   * 此处拓展service配置
   */
  public static NetServerOptions createNetServiceOptions() {
    return new NetServerOptions().setPort(ApplicationConfig.getInt("socket.port"));
  }

  public static DatagramSocketOptions createUDPServiceOptions() {
    return new DatagramSocketOptions();
  }
}
